Signal intensity matching of image sensors

ABSTRACT

Disclosed is a method of processing signals from a large-format scanner comprising a first and a second image sensor that provide respective image signals recorded at respective areas of a scanned medium, where a portion of the respective areas is recorded also by the other of the respective image sensors, whereby image data from overlapping and non-overlapping areas are present in the respective signals; the method comprising: determining a first and a second level of intensity from image signals from the first and the second image sensor at the overlapping area, respectively; determining a compensation value by processing the first level of intensity and the second level of intensity to determine a discrepancy between the level of intensities; applying compensation values to image data from overlapping and non-overlapping areas to provide compensated image data to compensate for a discrepancy between levels of intensity from the first and the second image sensor.

FIELD

This invention generally relates to optical scanning of an object. Moreparticularly the invention relates to optical scanning of largedocuments by a plurality of image sensors and to compensation of imagedata recorded by the plurality of image sensors.

BACKGROUND

Scanning of large objects, e.g. large maps or technical drawings, isconventionally performed by using a plurality of image sensors as it isa difficult and expensive task to manufacture large single imagesensors. Examples of image sensors are charge coupled device (CCD) orcontact image sensors (CIS). Differences between image sensors, however,create visible artefacts in the scanned images. The intensity of ascanned medium may look different dependent on which image sensor isused. This makes the scanned images less perceptually appealing. As thedifferences are non-static, compensation is a challenging task.

EP 2 091 223 entitled “Image reading device and image forming apparatus”discloses an optical scanner with multiple cameras that each outputsline signals. The cameras are arranged to each view a portion of a lineon a document to be scanned. The cameras view the line with a certainoverlap such that intensity information is recorded by two cameras inthe overlapping regions of the line. A complete line on the document isreproduced by combining line signals from the cameras. The line signalsare processed in the overlapping area to compensate for an intensityboundary, e.g. a visible artefact at the stitching point betweencameras, which may occur. The method, however, still creates visibleartefacts in the generated images.

Thus, it remains a problem to improve the image quality of large-formatscanners to compensate for differences between individual image sensors.

SUMMARY

According to a first aspect, there is provided a method of processingsignals from a first and a second image sensor that provide respectiveimage signals recorded at respective areas of a scanned medium, where aportion of the respective areas is recorded also by the other of therespective image sensors, whereby image data from overlapping andnon-overlapping areas are present in the respective signals; the methodcomprising:

-   -   determining a first and a second level of intensity from image        signals from the first and the second image sensor,        respectively, at the overlapping area;    -   determining a compensation value by processing the first level        of intensity and the second level of intensity to determine a        discrepancy between the first and second levels of intensity;    -   applying compensation values to image data from non-overlapping        areas to provide compensated image data to compensate for a        discrepancy between levels of intensity from the first and the        second image sensor.

Consequently, images with smooth transitions between the individualimage sensors can be created. Thereby, artefacts in scanned images as aresult of discrepancies between images sensors can be compensated for.

Compensation values may also be applied to image data from overlappingareas.

The method may be a method of processing signals from a large-formatscanner comprising a first and a second image sensor. The image sensormay comprise image sensor elements arranged in an array, e.g. a lineararray. The image sensor may comprise two staggered linear arrays ofimage sensor elements e.g. two 600 dpi arrays staggered to create a 1200dpi image sensor. Any kind of image sensors suitable for opticalscanning may be used, such as any kind of photo voltaic sensor e.g. acontact image sensor (CIS) or a charge coupled device (CCD) camera. Asuitable lighting device may be arranged together with the image sensorssuch as a xenon-based lighting device, a cold cathode fluorescent lampor an LED lighting device. The image sensors may comprise a plurality ofdifferent image sensor elements configured to detect light havingdifferent wave lengths; e.g. a first image sensor element may beconfigured to detect red light, a second image sensor element may beconfigured to detect green light, and a third image sensor element maybe configured to detect blue light. Alternatively or additionally, thelighting devices may be configured to illuminate the physical object tobe scanned with light having different wave lengths, e.g. the lightingdevices may be configured to create red, green, and blue light.

The image sensors may be arranged in any fashion as long as a commonarea of a scanned medium is recorded by at least two image sensors. Theimage sensors may be arranged on a movable structure, and/or a physicalmedium may be moved past the image sensors so that a completely scannedimage of the physical medium may be formed. The common area may berecorded by the image sensors at different points in time; e.g. theimage sensors may be arranged on two parallel lines, where every otherimage sensor is arranged with a field of view on a first line, and theimage sensors in-between are arranged with a field of view on a secondline, where the distance between the field of view of two adjacent imagesensors on a line is below the width of the field of view of the imagesensors, such that an area of a scanned medium recorded by an imagesensor on the first line is also recorded by an image sensor on thesecond line, at a different point in time; e.g. when the image sensorsand/or the physical medium are/is moved, as described in relation toFIG. 6 a.

The first and second levels of intensity are a measure of the lightintensity recorded by the first and the second image sensor,respectively at the overlapping area. The level of intensity for animage sensor may be determined by processing the signal generated by theimage sensor at the overlapping area when scanning a physical medium.The signal is constituted of values recorded by the image sensorelements of the image sensor in the overlapping area when scanning aphysical medium. The processing may be performed in a plurality ofdifferent ways such as by taking an average of the recorded values of ascanned line at the overlapping area, selecting one value of the signal,or an average of a plurality of values of the signal.

The compensation values may be determined by using any algorithm takingthe first and second levels of intensity as an input for creating acompensation value; i.e. the generated compensation value is dependenton both the first and second levels of intensity. The algorithm maygenerate a plurality of compensation values, e.g. a compensation valuefor each image sensor element of the first and the second image sensormay be generated. The compensation values may be applied to image datain any suitable manner, such as by adding the compensation value to theimage data or by multiplying image data with a compensation value. Thealgorithm may compare the first and second levels of intensity of thefirst and the second image sensor to determine which is higher, andcreate compensation values that, when applied to the image data,increase values originating from the image sensor having the lowestlevel of intensity and/or lower values originating from the image sensorhaving the highest level of intensity. The algorithm may createcompensation values that, when applied to image data, ensure that thevalues of the image data from both the first and the second image sensorin the overlapping region are equal, so that the image data can bestitched together without creating an intensity boundary. Additionally,the image data may be stitched together by fading in the overlappingarea from image data recorded by the first image sensor to image datarecorded by the second image sensor; e.g. the resulting image, afterstitching, may, in the overlapping area, have image data that arecreated by a weighted average of the data from both the first and thesecond image sensor, where the weight is determined based on theposition in the overlapping area so that values in the overlapping areaclose to the non-overlapping area of the first image sensor aredominated by the first image sensor and values close to thenon-overlapping area of the second image sensor is dominated by thesecond image sensor.

For large-format scanners comprising more than two image sensors, it maybe insufficient to determine compensation values using the methoddisclosed above.

In some embodiments, signals from a third image sensor are furtherprocessed, the third image sensor providing an image signal recorded atan area of a scanned medium, where a portion of the area is recordedalso by the second image sensor, whereby image data from at least twooverlapping and one non-overlapping area are present in the signals fromthe second image sensor; the method comprising:

-   -   determining a third and a fourth level of intensity from image        signals from the second and the third image sensor at the        overlapping area between the second and the third image sensor;    -   determining compensation values for image signals from        non-overlapping areas from the second image sensor by processing        the first, second, third, and fourth levels of intensity to        determine a discrepancy between the first and second levels of        intensity and further between the third and fourth levels of        intensity;    -   applying compensation values to image data from non-overlapping        areas of the second image sensor to provide compensated image        data to compensate for a discrepancy between levels of intensity        from the first and the second image sensor and further between        the second and the third image sensor.

Consequently, a method is provided that can compensate for discrepanciesbetween image sensors for complex large-format scanners comprising morethan two image sensors, securing even smoother and more perceptuallyappealing images.

The compensation values may be determined by using any algorithm takingthe first, second, third, and fourth levels of intensity as an input forcreating a compensation value; e.g. the generated compensation value isdependent on both the first, second, third, and fourth levels ofintensity. The algorithm may generate a plurality of compensationvalues, e.g. a compensation value for each image sensor element of thesecond image sensor may be generated. A first compensation value may bedetermined by processing the first and second levels of intensity and asecond compensation value may be determined by processing the third andfourth levels of intensity. Compensation values for the individual imagesensor elements of the second image sensor at the non-overlapping areamay be generated by an algorithm taking the first and secondcompensation values as an input; e.g. compensation values for theindividual image sensor elements of the second image sensor at thenon-overlapping area may be determined by performing an interpolationbetween the first and second compensation values, e.g. a linearinterpolation. Compensation values may also be determined for theoverlapping areas of the second image sensor, and applied to image datafrom overlapping and non overlapping areas of the second image sensor.

In some embodiments, the level of intensity at overlapping areas iscalculated as an average of image signals from multiple image sensorelements comprised by the image sensors. The first level of intensitymay be calculated as an average of the values recorded by the imagesensor elements of the first image sensor at the overlapping area.Correspondingly, the second level of intensity may be calculated as anaverage of the values recorded by the image sensor elements of thesecond image sensor at the overlapping area. The average may be aweighted average.

In several situations it may be advantageous to limit the amount ofcompensation applied, as over-compensation may distort the generatedimages. For instance as mentioned below.

In some embodiments, a first target value is determined for theoverlapping area between the first and the second image sensor as avalue between the first and second levels of intensity; and whereapplication of the compensation values makes the intensity level of thefirst and the second image sensor approach the first target value. Forinstance, the average of the values recorded by the first and the secondimage sensor is closer to the target value after application of thecompensation value.

The target value may be a value approximately midways between the firstand second levels of intensity.

In some embodiments, a second target value is determined for theoverlapping area between the second and the third image sensor as avalue between the third and fourth levels of intensity; and whereapplication of the compensation values makes intensity level of thesecond and the third image sensor approach the second target value. Forinstance, the average of the values recorded by the second and the thirdimage sensor is closer to the target value after application of thecompensation value.

Consequently, compensation may be applied that change the recorded dataonly to a limited extent.

Differences between image sensors are a function of the intensity; e.g.the first image sensor may be more sensitive to low intensities than thesecond image sensor, but less sensitive to high intensities. As theintensity of the scanned medium in the overlapping area may differ fromthe intensity in the remaining parts of the image sensors, compensationartefacts may occur.

In some embodiments, image data comprise image data representing a lineand where compensation values are calculated using information from aplurality of lines.

Consequently, by averaging over a number of lines, a plurality of firstand second levels of intensity resulting from a plurality of differentintensity levels may be used to create compensation values. Therebycompensation values may be generated that are valid for all differentintensity levels. By averaging over a plurality of lines, compensationerrors as a result of noise in the image data can also be minimized.

The method may use information from at least e.g. 2, 5, 10, 20, 50, 100,200, 300, 500, or 1000 lines to calculate compensation values. Themethod may use information from no more than e.g. 20, 50, 100, 200, 300,500, 1000, 2000, or 100000 lines to calculate compensation values. Asmentioned previously, the differences between the image sensors aretemporal variant. The image sensors are influenced by slowly changingparameters such as temperature, humidity, etc. The number of lines usedto average over should be selected such that it is large enough to limitartefacts, however, small enough to react to temporal variations of theimage sensors. The averaging may be implemented as a ring buffer. Byinserting the values into the ring buffers, values previously stored inthe ring buffer may be removed, e.g. the size of the ring buffers isconstant e.g. a first in first out (FIFO) ring buffer may be used. Theaverage may be a weighted average; e.g. new lines in the ring buffer maybe weighted higher than old lines or lines having special properties maybe weighted higher or lower.

In some embodiments, intensity values representing bright intensitiesare given a different influence on the calculation of compensationvalues than intensity values representing dark intensities.

In some embodiments, intensity values representing bright intensitiesare given a greater influence on the calculation of compensation valuesthan intensity values representing dark intensities.

In some embodiments, the method further comprises a step where a filterfilters away the first and second levels of intensity if the first andsecond levels of intensity are dark.

The method may replace the first and second levels of intensity with aguess. The guess may be first and second levels of intensity determinedfor previous lines, or an average of first and second levels ofintensity determined for previous lines, e.g. for the last 50, 100, 200,300, 500, or 1000 lines.

Bright intensities values may be intensity values having a value above30% of the maximum value possible with the chosen number of bits used torepresent intensity values e.g. if 10 bits are used, values above 307are bright intensity values.

Bright intensities values may be intensity values having a value abovee.g. 10%, 20%, 30%, 40%, 50%, 60%, 70% of the maximum value possiblewith the chosen number of bits used to represent intensity values.

Dark intensities values may be intensity values having a value below 30%of the maximum value possible with the chosen number of bits used torepresent intensity values; e.g. if 10 bits are used, values below 307are dark intensity values.

Dark intensities values may be intensity values having a value belowe.g. 5%, 8%, 10%, 20%, 30%, 40%, 50%, 60%, 70% of the maximum valuepossible with the chosen number of bits used to represent intensityvalues.

The inventor has surprisingly discovered that by primarily using brightintensity values to calculate compensation values, a better compensationfor discrepancies between image sensors can be achieved. The precisedefinition of dark and bright intensities depends on the type of imagesensor used.

The calculated level of intensities may be used to determine if theimage data in the overlapping area of an image sensor have dark and/orbright intensities, e.g. if the level of intensity is calculated as anaverage of the values recorded by image sensor elements at anoverlapping region, an average below 307 may indicate that darkintensity values are present in the overlapping region, if darkintensities are defined as a value below 30% of the maximum valuepossible (when using 10 bits to represent intensity values).

When performing colour scans, each image sensor may have differentsensitivity to different colours; e.g. a specific image sensor may bemore sensitive to red colours than to blue colours. Therefore,discrepancies between image sensors may differ for different colours.However, by correcting for the discrepancies for each colour, newartefacts are introduced into the resulting image as the colour balanceis changed.

In some embodiments, the image data comprise image data representingintensity levels at different colours and where a common compensationvalue is determined for the different colours.

Consequently, an efficient compensation can be applied withoutdisplacing the colour balance.

The common compensation value may be generated as an average ofcompensation values determined for each colour; e.g. a compensationvalue may be determined for each colour using the principles discussedabove, and the determined compensation values for the different coloursmay be averaged before they are applied to image data. Thereby, commoncompensation values may be generated that are valid for all colours.

In some embodiments, the common compensation value may be generated as aweighted average of compensation values determined for each colour.Consequently, images with a correct colour balance may be generated thatare visibly more appealing as the human eye has different sensitivity todifferences for different colours.

In some embodiments, the steps are performed as data for a line becomeavailable from scanning means or where the steps are performed at apoint in time after scanning of a complete set of lines is completed.For instance, the steps may be performed live e.g. at the same time as adocument is being scanned, or as post-processing after a document hasbeen scanned.

In some embodiments, compensation is applied equally for all imagesensor elements for at least the first or the second image sensor toshift the intensity level at least of the non-overlapping area to be onpar with a target value at the overlapping area.

In some embodiments, the method further comprises a step that checks ifthe signals recorded by the image sensors at the overlapping area resultfrom the same area of a scanned medium, and if the step determines thatthe signals recorded by the image sensors at the overlapping area do notresult from the same area of the scanned medium, it replaces thedetermined first and second level of intensity with a guess of the firstand second levels of intensity.

The check may be performed by calculating the normalized correlationcoefficient between the signals recorded by the first and the secondimage sensor at the overlapping area and examining if the resultingnormalized correlation coefficient is above a predetermined threshold orby performing a normal cross-correlation between the two signals andchecking if the maximum of the correlation function is close to lagzero, as it should be if the calibration of the scanner is precise.Alternatively to using the cross-correlation, the sum of absolutedifferences, or the sum of squared differences may be used. Informationfrom all colour channels may be used to perform the check; e.g. acombined sum of absolute differences may be calculated for all colourchannels. The guess may be first and second levels of intensitydetermined for previous lines, or an average of first and second levelsof intensity determined for previous lines e.g. for the last 50, 100,200, 300, 500, or 1000 lines.

According to a second aspect there is provided an apparatus for scanningcomprising a first and a second image sensor configured to providerespective image signals recorded at respective areas of a scannedmedium, where a portion of the respective areas is recorded also by theother of the respective image sensors, whereby image data fromoverlapping and non-overlapping areas are present in the respectivesignals; the optical scanner further comprising a processing unitconfigured to:

-   -   determine a first and a second level of intensity from image        signals from the first and the second image sensor at the        overlapping area, respectively;    -   determine a compensation value by processing the first level of        intensity and the second level of intensity to determine a        discrepancy between the first and second levels of intensity;    -   apply compensation values to image data from non-overlapping        areas to provide compensated image data to compensate for a        discrepancy between levels of intensity from the first and the        second image sensor.

All components of the apparatus may be integrated in a single integralunit, e.g. in an optical scanner, or the different parts of theapparatus may be implemented in different components; e.g. the imagesensors may be implemented in a first component and the processing unitmay be implemented in a second component, e.g. in a PC connected to thefirst component with data communication means or in a server connectedto the internet communicating directly or indirectly with the firstcomponent using data communication means.

Here and in the following, the terms ‘processing means’ and ‘processingunit’ are intended to comprise any circuit and/or device suitablyadapted to perform the functions described herein. In particular, theabove term comprises general purpose or proprietary programmablemicroprocessors, Digital Signal Processors (DSP), Application SpecificIntegrated Circuits (ASIC), Programmable Logic Arrays (PLA), FieldProgrammable Gate Arrays (FPGA), special-purpose electronic circuits,etc., or a combination thereof

The different aspects of the present invention can be implemented indifferent ways including the methods of processing signals and theapparatuses described above and in the following, each yielding one ormore of the benefits and advantages described in connection with atleast one of the aspects described above, and each having one or morepreferred embodiments corresponding to the preferred embodimentsdescribed in connection with at least one of the aspects described aboveand/or disclosed in the dependent claims. Furthermore, it will beappreciated that embodiments described in connection with one of theaspects described herein may equally be applied to the other aspects.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and/or additional objects, features and advantages of thepresent invention will be further elucidated by the followingillustrative and non-limiting detailed description of embodiments of thepresent invention, with reference to the appended drawings, wherein:

FIG. 1 shows three image sensors arranged with overlapping regionsaccording to an embodiment of the present invention.

FIG. 2 shows a flowchart of a method of processing signals according toan embodiment of the present invention.

FIGS. 3 a-b illustrate the problem with discrepancies between imagesensors.

FIGS. 4 a-b show how a method according to an embodiment of the presentinvention may be used to compensate for discrepancies between imagesensors.

FIG. 5 shows a flowchart of a method of determining compensation valuesaccording to an embodiment of the present invention.

FIG. 6 a shows four image sensors arranged with overlapping areasaccording to an embodiment of the present invention.

FIG. 6 b shows four image signals recorded by the image sensors in FIG.6 a.

FIG. 6 c shows compensation values for the four image sensors shown inFIG. 6 a provided by a method according to an embodiment of the presentinvention.

FIG. 6 d shows a compensated signal generated using a method accordingto an embodiment of the present invention.

FIG. 7 shows a schematic drawing of an apparatus for scanning accordingto an embodiment of the present invention.

DETAILED DESCRIPTION

In the following description, reference is made to the accompanyingfigures, which show, by way of illustration, how the invention may bepracticed.

FIG. 1 shows three image sensors 102 103 104 arranged with overlappingregions 106 107 109 110 according to an embodiment of the presentinvention. The image sensors 102 103 104 may be CIS image sensors. Theimage sensors 102 103 104 may be arranged on a movable member, movingthe image sensors past a medium to be scanned, and/or the medium may bemoved past the image sensors using suitable means, e.g. motor operatedrolls pulling the physical medium past the image sensors, such that acomplete image of the physical medium can be generated. The imagesensors 102 103 104 are arranged such that a portion of the arearecorded of a scanned medium by one image sensor is also recorded byanother image sensor; e.g. the region 106 of image sensor 102 recordsthe same area as the region 107 of image sensor 103 just at anotherpoint in time; e.g. when the image sensors or the medium has been moved.Correspondingly, the region 109 of image sensor 103 records the samearea as the region 110 of image sensor 104. Alternatively, if the imagesensors are CCD cameras, the image sensors may be arranged on a singleline recording the same area of a scanned medium at the same time.

FIG. 2 shows a flowchart of a method of processing signals 201 accordingto an embodiment of the present invention. In the first step 202 a firstlevel of intensity is determined for intensity values recoded by a firstimage sensor at an overlapping area, e.g. area 106 of image sensor 102in FIG. 1. The first level of intensity may be calculated as an averageof the intensity values recorded by the first image sensor at theoverlapping area. Then, in step 203, a second level of intensity isdetermined for intensity values recorded by a second image sensor at anoverlapping area, e.g. area 107 of image sensor 103 in FIG. 1.Correspondingly, the second level of intensity may be calculated as anaverage of the intensity values recorded by the second image sensor atthe overlapping area. If the image sensors are arranged as shown in FIG.1, image data from the first or the second image sensors (dependent onthe direction in which the image sensors and/or a physical medium are/ismoved) should be delayed, to secure that image data recorded by thefirst and the second image sensors at the overlapping area results fromthe same part of the scanned medium, e.g. if the distance between thefirst and the second image sensor is 1 inch and 600 lines are recordedpr. inch, a delay of 600 lines between the first and the second imagesensor should be used. In step 204 a compensation value is determined.The compensation value is determined by processing the first and secondlevels of intensity; e.g. the compensation value is dependent on boththe first and second levels of intensity. A plurality of compensationvalues may be determined, e.g. one for each image sensor or even one foreach image sensor element of each image sensor. Finally, in step 205,the compensation value is applied to the image data recorded by thefirst and the second image sensors at both overlapping andnon-overlapping areas. Thereby, a discrepancy between the first and thesecond image sensor may be compensated for.

FIGS. 3 a-b illustrate a problem with discrepancies between imagesensors.

A first signal 301 originating from a first image sensor and a secondsignal 302 originating from a second image sensor are shown. The twoimage sensors are arranged with an overlapping area, e.g. image sensor102 and 103 in FIG. 1, whereby overlapping image data 303 304 arepresent in the two signals 301 302. If the two image sensors wereidentical, the overlapping part 303 304 of the two signals 301 302should be identical. However, as a result of a discrepancy between thetwo image sensors, the intensity values in the overlapping region of thefirst signal 303 are higher than the intensity values of the secondsignal 304 even though the morphology of the signals is the same, e.g.they have the same shape. The lines 305 show the average value of thefirst signal in the overlapping area. Correspondingly, the line 306shows the average value of the image signal 302 in the overlapping area,and the arrow 307 shows the difference between 305 and 306. FIG. 3 bshows the problem occurring when stitching signals together recorded bydifferent image sensors. Because of the discrepancy between the imagesensors, an intensity boundary 309 is introduced in the resultingcombined signal 308. The problem may partially be solved by implementinga fade from first signal 303 to the second signal 304 in the overlappingarea. This will, however, still create a visible artefact as theoverlapping area is usually relatively small compared to thenon-overlapping area of the image sensors.

FIGS. 4 a-b show how a method according to an embodiment of the presentinvention may be used to compensate for discrepancies between imagesensors. By processing the two signals 301 302 shown in FIG. 3 a, usingthe principles discussed in relation to FIG. 2, two compensation values401 and 402 are created, e.g. one compensation value for image sensor102 and one compensation value for image sensor 103 in FIG. 1. In thisembodiment the same compensation value is used for all image sensorelements of an image sensor. The first compensation value 401 has avalue below 1.0 and the second compensation value 402 has a value above1.0 as the first signal 301 in FIG. 3 a has higher intensity values thanthe second signal 302. By applying the compensation values 401 402 tothe two signals 403 404, e.g. by multiplying the signal 403 with thecompensation value 401 and further multiplying the signal 404 with thecompensation value 402, the intensity levels of the two signals arebrought at point so that they may be stitched together into theresulting signal 405, without creating an intensity boundary at thestitching point 406.

FIG. 5 shows a flowchart of a method of determining compensation valuesfor a scanned line according to an embodiment of the present invention.First, a first overlapping area is chosen comprising a first and asecond image sensor, in step 501 e.g. the first overlapping area 112comprises the first image sensor 102 and the second image sensor 103 inFIG. 1. Then, a first colour channel is selected in step 502, typically,if the scan is a colour scan, three channels exist (red, green, blue),and if the scan is a black-and-white/gray scale scan one channel exists.Then, in step 503, a first and a second level of intensity aredetermined by calculating the average intensity for the signals recordedat the overlapping area by the first and the second image sensors, e.g.305 and 306 in FIG. 3 a, respectively. Image data from the first or thesecond image sensors (dependent on the direction in which the imagesensors and/or a physical medium are/is moved) should be delayed tosecure that image data recorded by the first and the second imagesensors at the overlapping area result from the same part of a scannedmedium, e.g. if the distance between the first and the second imagesensor is 1 inch and 600 lines are recorded pr. inch, a delay of 600lines between the first and the second image sensor should be used. Instep 504, the difference between the first and second levels ofintensity is determined. Then at step 505, a check is performed tosecure that the signals recorded by the image sensors at the overlappingarea result from the same area of the scanned medium. The signals maycome from different parts of the scanned medium if the scanner is notadequately calibrated, e.g. if the image sensors have moved a smallamount, so that the correct delay between the image sensors should havebeen 589 lines instead of 600 lines, or if the image sensors have movedsideways so that the overlap is in reality larger or smaller. The checkmay be performed by calculating the normalized correlation coefficientand checking if the resulting coefficient is above a predeterminedthreshold or by performing a normal cross-correlation between the twosignals and checking if the maximum of the correlation function is closeto lag zero, as it should be if the calibration of the scanner isprecise. Alternatively to using the cross-correlation, the sum ofabsolute differences may be used. Information from all colour channelsmay be used to perform the check, e.g. a combined sum of absolutedifferences may be calculated for all colour channels. If the methoddetermines that the image sensors have not examined the same area on thescanned medium, the level of intensity for the first and the secondimage sensor calculated in step 503 is replaced with a guess in step506. The guess may be the average of the level of intensity for thefirst and the second image sensor determined for a number of previouslines, e.g. for the last 50, 100, 200, 300, 500, or 1000 lines. Afterstep 506, or if the method in step 505 determines that the image sensorshave examined the same area on the scanned medium, the method checks ifthe intensities in the overlapping area are too dark. The check may beperformed by adding the determined first and second level of intensitytogether, and checking if the value is above a predetermined threshold.If the method determines that the intensities are too dark the first andsecond levels of intensity calculated in step 504 are replaced with aguess in step 508, in the same manner as in step 506. In contrast, ifthe method determines that the intensity values are not too dark, themethod proceeds to step 509, where the first and second levels ofintensity are normalized. The normalization may be performed by dividingthe first and second levels of intensity by the combined sum of thefirst and second levels of intensity respectively. Then, in step 510,each of the first and second levels of intensity is inserted into afirst and a second ring buffer for the chosen colour channel. The ringbuffer may contain previously calculated level of intensities for thechosen colour channel, for the last 50, 100, 200, 300, 500, or 1000lines. At step 511, a compensation value for the first and the secondimage sensor is determined by processing the data in the first andsecond ring buffer. The compensation values may be determined by firstlycalculating an average first level of intensity as the average of thevalues in the first ring buffer, and an average second level ofintensity as the average of the values in the second ring buffer. Then,the following equation may be used to give the compensation values forthe first and the second image sensor:

${COR}_{1} = {1 + \frac{\overset{\_}{{Li}_{2}} - \overset{\_}{{Li}_{1}}}{\overset{\_}{{Li}_{2}} + \overset{\_}{{Li}_{1}}}}$${COR}_{2} = {1 - \frac{\overset{\_}{{Li}_{2}} - \overset{\_}{{Li}_{1}}}{\overset{\_}{{Li}_{2}} + \overset{\_}{{Li}_{1}}}}$

where Li₁ is the average first level of intensity, Li₂ is the averagesecond level of intensity, COR₁ is the first compensation value for thefirst image sensor, and COR₂ is the second compensation value for thesecond image sensor. The method then repeats steps 503-511 for theremaining colour channels, e.g. the remaining two colour channels for acolour scan. When all colour channels have been processed, the method,proceeds to step 512, where the calculated compensation values areaveraged for all colour channels, e.g. only for a single channel whenperforming a black-and-white/gray scale scan, but typically for 3channels when performing a colour scan. A combined compensation valuefor the first image sensor at the first overlapping area and a combinedcompensation value for the second image sensor at the first overlappingarea are created that are valid for all colours. Steps 502-512 are thenrepeated for the remaining overlapping areas, e.g. for the secondoverlapping area 113 comprising the second image sensor 103 and thethird image sensor 104 in FIG. 1.

For image sensors arranged with two overlapping areas such as imagesensor 103 in FIG. 1, two compensation values are calculated. Togenerate compensation values for the individual image sensor elementsany type of interpolation may be used between the two compensationvalues, e.g. a linear interpolation between the two calculatedcompensation values such that the compensation applied to image sensorelements close to one of the overlapping regions is dominated by thecompensation value estimated at that region.

For image sensors arranged with a single overlapping areas such as imagesensor 102 104 in FIG. 1, one compensation values is calculated. Togenerate compensation values for the individual image sensor elements,the calculated compensation value may be copied, e.g. all image sensorelements are compensated with the same compensation value.

FIG. 6 a shows four image sensors 601 602 603 604 arranged withoverlapping areas 605 606 607 according to an embodiment of the presentinvention. The image sensors 601 602 603 604 may be CIS image sensors.The image sensors 601 602 603 604 may be arranged on a movable member,moving the image sensors past a medium to be scanned, and/or the mediummay be moved past the image sensors using suitable means, e.g. motoroperated rolls pulling the physical medium past the image sensors, suchthat a complete image of the physical medium can be generated. The imagesensors are arranged on two parallel lines, where every other imagesensor 601 603 is arranged with a field of view on a first line and theimage sensors in-between 602 604 are arranged with a field of view on asecond line, where the distance between the field of view of twoadjacent image sensors on a line 629 is below the width of the field ofview of the image sensors 630, such that an area of a scanned mediumrecorded by an image sensor on the first line is also recorded by animage sensor on the second line 605 606 607, at a different point intime; e.g. when the image sensors and/or the physical medium have/hasbeen moved.

FIG. 6 b shows four image signals 608 609 610 611 recorded by the imagesensors in FIG. 6 a. The first image signal 608 is recorded by the firstimage sensor 601, the second image signal 609 is recorded by the secondimage sensor 602, the third image signal 610 is recorded by the thirdimage sensor 603, and the fourth image signal 611 is recorded by thefourth image sensor 604. A part of the first image signal 608 and thesecond image signal 609 is recorded at the overlapping area 605. Thefirst image signal 608 has higher intensity values in the overlappingarea 605 than the second image signal 609. This indicates that the firstimage sensor 601 generally records higher intensity values than thesecond image sensor 602. A part of the second image signal 609 and thethird image signal 610 is recorded at the overlapping area 606. Thesecond image signal 609 has higher intensity values in the overlappingarea 606 than the third image signal 610. This indicates that the secondimage sensor 602 generally records higher intensity values than thethird image sensor 603. A part of the third image signal 610 and thefourth image signal 611 is recorded at the overlapping area 607. Thefourth image signal 611 has higher intensity values in the overlappingarea 607 than the third image signal 610. This indicates that the fourthimage sensor 604 generally records higher intensity values than thethird image sensor 603. As it can be seen discrepancies exist betweenall image sensors (to varying degrees).

FIG. 6 c shows compensation values 616 617 618 619 for the four imagesensors 601 602 603 604 shown in FIG. 6 a provided by a method accordingto an embodiment of the present invention. The two compensation values620 621 are created by performing steps 502-512 discussed in relation toFIG. 5 on the part of the first image signal 608 and the second imagesignal 609 recorded at the overlapping area 605. Correspondingly, thetwo compensation values 622 623 are created by processing the part ofthe second image signal 609 and the third image signal 610 recorded atthe overlapping area 606, and the two compensation values 624 625 arecreated by processing the part of the third image signal 610 and thefourth image signal 611 recorded at the overlapping area 607. For theimage sensors arranged with a single overlapping area 601 604, all imagesensor elements are compensated with the same compensation value, e.g. aset of compensation values 616, one for each image sensor element ofimage sensor 601, is created by copying the estimated compensation value620. Correspondingly, a set of compensation values 619, one for eachimage sensor element of image sensor 604, is created by copying theestimated compensation value 625. For the image sensors arranged withtwo overlapping areas 602 603, different compensation values are createdfor each image sensor element, e.g. for image sensor 602 a set ofcompensation values 617 is created, one for each image sensor element,by performing a linear interpolation between the estimated compensationvalues 621 622. Correspondingly, for image sensor 603 a set ofcompensation values 618 is created, one for each image sensor element,by performing a linear interpolation between the estimated compensationvalues 623 624. By applying the compensation values to the image data;e.g. by multiplying the value recorded by each image sensor element ofeach image sensor, with its respective compensation value the resultingsmooth signal 628 shown in FIG. 6 d without any intensity boundaries atthe stitching points is generated.

FIG. 7 shows a schematic drawing of an apparatus for scanning 701,according to an embodiment of the present invention. The apparatuscomprises a first image sensor 702 and a second image sensor 703configured to provide respective image signals recorded at respectiveareas of a scanned medium, where a portion of the respective areas 705is recorded also by the other of the respective image sensors, wherebyimage data from overlapping and non-overlapping areas are present in therespective signals. The apparatus further comprises a processing unit704 connected to the image sensors by data communication means 706 707.The processing unit 704 may process the signals received from the imagesensors 702 703 using the principles discussed in relation to FIG. 2and/or FIG. 5. All components of the apparatus 701 may be integrated ina single integral unit, e.g. in an optical scanner, or the differentparts of the apparatus may be implemented in different components; e.g.the image sensors 702 703 may be implemented in a first component 708and the processing unit may be implemented a second component 704 e.g.in a personal computer (PC) connected to the first component 708 withdata communication means 706 707 or in a server connected to theinternet communicating directly or indirectly with the first component708 using data communication means 706 707.

Although some embodiments have been described and shown in detail, theinvention is not restricted to them, but may also be embodied in otherways within the scope of the subject matter defined in the followingclaims. In particular, it is to be understood that other embodiments maybe utilised and structural and functional modifications may be madewithout departing from the scope of the present invention.

In device claims enumerating several means, several of these means canbe embodied by one and the same item of hardware. The mere fact thatcertain measures are recited in mutually different dependent claims ordescribed in different embodiments does not indicate that a combinationof these measures cannot be used to advantage.

It should be emphasized that the term “comprises/comprising” when usedin this specification is taken to specify the presence of statedfeatures, integers, steps or components, but does not preclude thepresence or addition of one or more other features, integers, steps,components or groups thereof.

1. A method of processing signals from a first and a second image sensorthat provide respective image signals recorded at respective areas of ascanned medium, where a portion of the respective areas is recorded alsoby the other of the respective image sensors, whereby image data fromoverlapping and non-overlapping areas are present in the respectivesignals; the method comprising: determining a first and a second levelof intensity from image signals, at the overlapping area, from the firstand the second image sensor respectively, determining a compensationvalue by processing the first level of intensity and the second level ofintensity to determine a discrepancy between the first and second levelsof intensity at the overlapping area; applying the compensation value,determined from the discrepancy between the first and second levels ofintensity of image signals at the overlapping area, to image data fromoverlapping and non-overlapping areas to provide compensated image datato compensate for a discrepancy between levels of intensity from thefirst and the second image sensor, wherein the above steps are performedat the same time as a document is being scanned.
 2. A method accordingto claim 1, where signals from a third image sensor are furtherprocessed, the third image sensor providing an image signal recorded atan area of a scanned medium, where a portion of the area is recordedalso by the second image sensor, whereby image data from at least twooverlapping and one non-overlapping area are present in the signals fromthe second image sensor; the method comprising: determining a third anda fourth level of intensity from image signals from the second and thethird image sensor at the overlapping area between the second and thethird image sensor; determining compensation values for image signalsfrom non-overlapping areas from the second image sensor by processingthe first, second, third, and fourth levels of intensity to determine adiscrepancy between the first and second levels of intensity and furtherbetween the third and fourth levels of intensity; applying compensationvalues to image data from non-overlapping areas of the second imagesensor to provide compensated image data to compensate for a discrepancybetween levels of intensity from the first and the second image sensorand further between the second and the third image sensor.
 3. A methodaccording to claim 1, where the level of intensity at overlapping areasis calculated as an average of image signals from multiple image sensorelements comprised by the image sensors.
 4. A method according to claim1, where a first target value is determined for the overlapping areabetween the first and the second image sensor as a value between thefirst and second levels of intensity; and where the compensation valuesare applied to make the first and second levels of intensity of thefirst and the second image sensor approach the first target value.
 5. Amethod according to claim 2, where a first target value is determinedfor the overlapping area between the first and the second image sensoras a value between the first and second levels of intensity; and wherethe compensation values are applied to make the first and second levelsof intensity of the first and the second image sensor approach the firsttarget value, and where a second target value is determined for theoverlapping area between the second and the third image sensor as avalue between the third and fourth levels of intensity; and where thecompensation values are applied to make the third and fourth levels ofintensity of the second and the third image sensor approach the secondtarget value.
 6. A method according to claim 1, where image datacomprise image data representing a line and where compensation valuesare calculated using information from a plurality of lines.
 7. A methodaccording to claim 1, where intensity values representing brightintensities are given a greater influence on the calculation ofcompensation values than intensity values representing dark intensities.8. A method according to claim 1, where the image data comprise imagedata representing intensity levels at different colours and where acommon compensation value is determined for the different colours.
 9. Amethod according to claim 1, where the steps are performed as data for aline become available from a scanning means or where the steps areperformed at a point in time after scanning of a complete set of linesis completed.
 10. A method according to claim 1, where compensation isapplied equally for all image sensor elements for at least the first orthe second image sensor to shift the intensity level at least of thenon-overlapping area to be on par with a target value at the overlappingarea.
 11. A method according to claim 1, where the method furthercomprises a step that checks if the signals recorded by the imagesensors at the overlapping area result from the same area of a scannedmedium, and, if the step determines that the signals recorded by theimage sensors at the overlapping area do not result from the same areaof the scanned medium, it replaces the determined first and second levelof intensity with a guess of the first and second levels of intensity.12. A data processing system having stored thereon program code meansadapted to cause the data processing system to perform the steps of themethod according to claim 1, when said program code means are executedon the data processing system.
 13. A computer program product comprisingprogram code means adapted to cause a data processing system to performthe steps of the method according to claim 1, when said program codemeans are executed on the data processing system.
 14. A computer programproduct according to claim 13, comprising a computer-readable mediumhaving stored thereon the program code means.
 15. A computer data signalembodied in a carrier wave and representing sequences of instructionswhich, when executed by a processor, cause the processor to perform thesteps of the method according to claim
 1. 16. An apparatus for scanningcomprising a first and a second image sensor configured to providerespective image signals recorded at respective areas of a scannedmedium, where a portion of the respective areas is recorded also by theother of the respective image sensors, whereby image data fromoverlapping and non-overlapping areas are present in the respectivesignals; the apparatus further comprising a processing unit configuredto: determine a first and a second level of intensity from imagesignals, at the overlapping area, from the first and the second imagesensor, respectively; determine a compensation value by processing thefirst level of intensity and the second level of intensity to determinea discrepancy between the first and second levels of intensity at theoverlapping area; apply the compensation value, determined from thediscrepancy between the first and second levels of intensity of imagesignals at the overlapping area, to image data from overlapping andnon-overlapping areas to provide compensated image data to compensatefor a discrepancy between levels of intensity from the first and thesecond image sensor, wherein the processing unit is further configuredto perform the above steps at the same time as a document is beingscanned.